package spring.batch.readFile;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.retry.RetryCallback;
import org.springframework.retry.RetryContext;
import org.springframework.retry.listener.RetryListenerSupport;

/**
 * @Author: huhx
 * @Date: 2017-11-01 下午 7:00
 */
public class Slf4jRetryListener extends RetryListenerSupport {
    private static final Logger LOG = LoggerFactory.getLogger(RetryListenerSupport.class);

    @Override
    public <T, E extends Throwable> void onError(RetryContext context, RetryCallback<T, E> callback, Throwable throwable) {
        LOG.error("retried operation",throwable);
    }
}
